package com.testitems.controller.user.dto;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * <pre>
 *
 * </pre>
 *
 * @author gfh
 * @create 2021/11/20
 */
@Data
@ApiModel
@Api(tags = "注册账户")
public class UserCreateRequest {


    @ApiModelProperty("姓名")
    @NotNull
    @Size(min = 1, max = 50, message = "姓名长度必须在 1 - 50 之间")
    private String name;

    @ApiModelProperty("账户")
    @NotNull
    @Email
    @Size(min = 3, max = 50, message = "邮箱长度必须在 3 - 50 之间")
    private String username;

    @ApiModelProperty("密码")
    @NotNull
    @Size(min = 6, max = 16, message = "密码长度必须在 6 - 16 之间")
    private String password;

    @ApiModelProperty("重新输入密码")
    @NotNull
    @Size(min = 6, max = 16, message = "密码长度必须在 6 - 16 之间")
    private String rePassword;

    @ApiModelProperty("角色 2管理员，3员工")
    @NotNull
    private Integer roleLevel;
}
